﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Tetris
{
    class Block : Figure
    {
        private static readonly char[,] Body = { { '#' } };

        public bool IsDestructable;

        public Block(MatrixCoords topLeft, ConsoleColor color = ConsoleColor.Black)
            : base(topLeft, Block.Body, color)
        {
            this.IsDestructable = true;
        }

        public override void Update()
        {

        }

        public override void Rotate()
        {

        }

        public override IEnumerable<Figure> ProduceFigures()
        {
            return new List<Figure>();
        }

        public override bool Equals(object obj)
        {
            Block block = obj as Block;

            if (block == null)
            {
                return false;
            }

            return this.topLeft.Equals(block.GetTopLeft());
        }

        public override int GetHashCode()
        {
            return this.topLeft.GetHashCode();
        }
    }
}
